function dispimg(img, k)
    n = (2^k) -1;
    g = mat2gray(img, [0, n]);
    imshow(g)
    pause;
end
